﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 简单实现注册注册登录功能
{
    [Serializable]
    internal class User
    {
        private string _username;
        private string _password;

        public string UserName { get { return _username; } set { _username = value; } }
        public string Password { get { return _password; } set { _password = value; } } 
        public User() { }
        public User(string username, string password)
        {
            _username = username;
            _password = password;
        }

        public override bool Equals(object obj)
        {
            return obj is User user &&
                user.UserName == _username &&
                user.Password == _password;
        }
    }
}
